/* const str = "hello";

type MyTypes = number | string | boolean | null | undefined;

function parse(value: MyTypes) { 
  if (typeof value === "number") {
    return value * 2;
  }
  else if (typeof value === "string") { 
    return value.toUpperCase();
  }
  else if (typeof value === "boolean") { 
    return !value;
  }
  else { 
    console.log(value)
  }
} */

let temp1 = "hello";
const temp2 = "hello";
const temp3 = null;
const temp4 = (a: number, b: number) => a + b + "";


type Temp1 = typeof temp1;
type Temp2 = typeof temp2;
type Temp3 = typeof temp3;
type Temp4 = typeof temp4;

const user = {
  name: "John",
  age: 18,
  address: {
    province: "四川",
    city: "成都"
  }
}

type User = typeof user;

const person: User = {
  name: "Tom",
  age: 19,
  address: {
    province: "四川",
    city: "成都"
  }
}
